﻿using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace WorkflowDesigner.UI
{
    internal class ShapeLine : ShapeBase
    {
        /// <summary>
        /// 线条样式 
        /// </summary>
        public LineStyle Style { get; set; }

        public ShapeLine()
        {
            Id = Guid.NewGuid();
        }

        public override void Paint(Graphics graphics)
        {
            Pen.CustomEndCap = new AdjustableArrowCap(5, 8, true);
            if (this.Style == LineStyle.Straight)
            {
                graphics.DrawLine(Pen, X, Y, X + Width, Y + Height);
                base.Paint(graphics);
            }
            else if (this.Style == LineStyle.Polyline)
            {

            }
        }

        public override bool Contian(Point p)
        {
            throw new NotImplementedException();
        }

        public override Point? GetNearHandle(Point point)
        {
            throw new NotImplementedException();
        }
    }
}
